<template>
  <div style="padding-top: 16px;">
    <p>
      <strong>预览</strong>
    </p>
    <z-input value="默认"></z-input>
    <z-input value="只读" readonly></z-input>
    <z-input value="禁用" disabled></z-input>
    <z-input value="报错" error errorMsg="手机号格式不正确"></z-input>
    <p>
      <strong>代码</strong>
    </p>
    <pre><code>{{content}}</code></pre>
  </div>
</template>
<script>
  import {zInput} from '../../../src/main'
  export default {
    components: {
      zInput
    },
    data () {
      return {
        content: `
          <z-input value="默认"></z-input>
          <z-input value="只读" readonly></z-input>
          <z-input value="禁用" disabled></z-input>
          <z-input value="报错" error errorMsg="手机号格式不正确"></z-input>
      `.replace(/^ {8}/gm, '').trim()
      }
    }
  }
</script>